<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let arr = ['1']
        Object.defineProperty(arr, 1, {
            value: '1',
            configurable: true,
            writable: true,
            enumerable: true,
            getter: function (val) {
                // 不会触发
                console.log(val, 'val');
                return val;
            },
            setter: function (val) {
                // 不会触发
                console.log(val, 'val');
            }
        })
        arr[1] = 3
        arr.push(2)
        arr.length = 0
    </script>
</body>
</html>